/* jshint indent: 1 */

module.exports = function(sequelize, DataTypes) {
	return sequelize.define('t_user', {
		id: {
			type: DataTypes.INTEGER(11),
			allowNull: false,
			autoIncrement: true,
			unique: true
		},
		code: {
			type: DataTypes.STRING(255),
			allowNull: false,
			primaryKey: true
		},
		name: {
			type: DataTypes.STRING(255),
			allowNull: true
		},
		password: {
			type: DataTypes.STRING(255),
			allowNull: true
		},
		role_code: {
			type: DataTypes.STRING(63),
			allowNull: true
		},
		mobile: {
			type: DataTypes.STRING(255),
			allowNull: true
		},
		createtime: {
			type: DataTypes.DATE,
			allowNull: true
		},
		hot: {
			type: DataTypes.INTEGER(255),
			allowNull: true,
			defaultValue: '0'
		},
		accesstime: {
			type: DataTypes.DATE,
			allowNull: true
		}
	}, {
		tableName: 't_user',
		timestamps: false
	});
};
